package com.corpgovernment.organization.entity.db;

import com.corpgovernment.common.annotation.OperateLogFieldDesc;
import com.corpgovernment.common.entity.db.BaseEntity;
import com.corpgovernment.common.enums.DeleteStatusEnum;
import com.corpgovernment.common.handler.Sm4TypeHandler;
import com.corpgovernment.organization.enumm.ValidEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import tk.mybatis.mapper.annotation.ColumnType;

import javax.persistence.*;
import java.util.Date;

/**
 * 员工非员工新鲜度实体
 *
 * @author wangyujue
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Table(name = "mb_fresh_passenger")
public class MbFreshPassenger extends BaseEntity {

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @OperateLogFieldDesc(value = "主键")
    private Long id;

    @Column(name = "employee_uid")
    @OperateLogFieldDesc(value = "员工id")
    private String employeeUid;

    @Column(name = "org_id")
    @OperateLogFieldDesc(value = "组织id")
    private String orgId;

    @Column(name = "non_employee_uid")
    @OperateLogFieldDesc(value = "非员工id")
    private Long nonEmployeeUid;

    @Column(name = "create_uid")
    @OperateLogFieldDesc(value = "创建人id")
    private String createUid;

    @Column(name = "fresh_time")
    @OperateLogFieldDesc(value = "刷新时间")
    private Date freshTime;

    @Column(name = "name")
    @OperateLogFieldDesc(value = "名称")
	@ColumnType(typeHandler = Sm4TypeHandler.class)
    private String name;

    @Column(name = "en_name")
    @OperateLogFieldDesc(value = "英文名称")
	@ColumnType(typeHandler = Sm4TypeHandler.class)
    private String enName;

    @Column(name = "valid")
    @OperateLogFieldDesc(value = "有效性", type = ValidEnum.class)
    private Boolean valid;

    @Column(name = "is_deleted")
    @OperateLogFieldDesc(value = "删除状态", type = DeleteStatusEnum.class)
    private Boolean isDeleted;
}
